import Link from "next/link"; import { ArrowRight, Search } from "lucide-react"; import { getLocale } from "@/lib/i18n/server"; import { fmtDate, href, t } from "@/lib/i18n"; import { domainsWithCounts, graph, listPapers, stats } from "@/lib/papers/queries"; import { PaperCard, PaperRow } from "@/components/paper-items"; import { StatTiles } from "@/components/stat-tiles"; import { Constellation, type GEdge, type GNode } from "@/components/constellation"; export const revalidate = 300; export default async function Home() { const locale = await getLocale(); const d = t(locale); const [s, featured, latest, domains, g] = await Promise.all([stats(), listPapers({ featured: true, sort: "recent", perPage: 4 }), listPapers({ sort: "revised", perPage: 6 }), domainsWithCounts(), graph(["topic", "method", "dataset", "author", "semantic", "curated"])]); const featuredItems = [...featured.items].sort((a, b) => (a.featured_rank ?? 99) - (b.featured_rank ?? 99)); return ( <>

{d.site.secondary} · {d.site.affiliation}

{d.home.heroTitle}

{d.home.heroLead}

{d.home.explore} {d.home.browseTopics}

{d.site.tagline}

{d.home.stats}

{d.home.statsLead}

{featuredItems.length > 0 && (

{d.home.featured}

{d.home.featuredLead}

{d.home.viewAll} →
{featuredItems.map((p) => )}
)}

{d.home.latest}

{d.home.latestLead}

{d.home.viewAll} →
{latest.items.map((p) => )}

{d.home.domains}

{d.home.domainsLead}

{d.home.constellation}

{d.home.constellationLead}

{d.home.openMap} →

{d.stats.latest}: {s.latest ? fmtDate(locale, s.latest, "month") : "—"}

); }